#include"AVLTree.h"
#include<time.h>
#include<vector>

void test1()
{
	AVLTree<int, int> ad;
	srand(time(0));
	int n = 100;
	vector<pair<int, int>> v;
	while (n--)
	{
		v.push_back(make_pair(rand() % 20, n));
	}
	for (auto e : v)
	{
		while (ad.insert(e) == 1)
		{
			ad.balace();
			ad.print();
			cout << endl;
		}

	}
	ad.print();
}

void test2()
{
	AVLTree<int, int> ad;
	vector<int> v = { 12,19,13 };
	for (int e : v)
	{
		if (e == 9)
			int i = 0;
		ad.insert(make_pair(e, e));

		ad.balace();
		ad.print();
		cout << '\n';
		ad.balace();
	}
}

int main()
{
	test1();
	return 0;
}